﻿using System;
using System.Data;

namespace DAL
{
    public static class DalLogReportExpenditure
    {
        private static readonly clsConnect Cls = new clsConnect();
        #region[Get-Data]
        public static DataTable GetLogReportExpenditure(string keywords,string DateBegin,string DateEnd)
        {
            Cls.CreateNewSqlCommand();
            Cls.AddParameter("@KEYWORDS", keywords);
            Cls.AddParameter("@DateBegin", DateBegin);
            Cls.AddParameter("@EndBegin", DateEnd);
            return Cls.GetData("sp_Log_Report_Expenditure_Get");
        }
        #endregion

        #region[Insert-Update-Delete]
        public static bool Delete(EtLogReportExpenditure obj)
        {
            Cls.CreateNewSqlCommand();
            Cls.AddParameter("@Id_log", obj.Id_log);
            return Cls.ExecuteNonQuery("sp_Log_Report_Expenditure_Delete");
        }
        #endregion
    }
    public class EtLogReportExpenditure
    {
        public int Id_log { get; set; }
        public int ReportExpenditure_ID { get; set; }
        public int Uses_Id { get; set; }
        public DateTime Date_log { get; set; }
        public string Reason { get; set; }
    }
}
